﻿using Net5ApiAndEfMySql.DtoModel;
using Net5ApiAndEfMySql.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VueAndNetCoreEfApi.DtoModel.SystemAdmin;
using VueAndNetCoreEfApi.IRepository.SystemAdmin;
using VueAndNetCoreEfApi.IService.SystemAdmin;
using VueAndNetCoreEfApi.PoModel.SystemAdmin;

namespace VueAndNetCoreEfApi.Service.SystemAdmin
{
    public class OutsourceService: BaseService, IOutsourceService
    {
        private IOutsourceRepository _ioutsourceRepository;
        public OutsourceService(IOutsourceRepository ioutsourceRepository)
        {
            _ioutsourceRepository = ioutsourceRepository;
        }
        //显示

        public PagerResult<OutsourcePo> GetPageList(SearchModel sm)
        {
            return _ioutsourceRepository.GetPageList(sm);
        }
        //添加
        public bool AddOutsourcePo(OutsourcePo op)
        {
            return _ioutsourceRepository.AddOutsourcePo(op);
        }
        //修改
        public bool UpdateOutsourcePo(OutsourcePo op)
        {
            return _ioutsourceRepository.UpdateOutsourcePo(op);
        }
        //反填
        public OutsourcePo GetOutsourcePoID(int os_id)
        {
            return _ioutsourceRepository.GetOutsourcePoID(os_id);
        }
        //删除
        public bool DeleteOutsourcePo(int os_id)
        {
            return _ioutsourceRepository.DeleteOutsourcePo(os_id);
        }
        public OutsourceDto GetOutsourceDtoByOsid(int os_id)
        {
            return _ioutsourceRepository.GetOutsourceDtoByOsid(os_id);
        }
    }
}
